<?php
namespace app\index\controller;
use think\Controller;
use think\Db;
use app\index\controller\user;
class Index extends Controller
{
    public function index()
    {
        //数据库获取数据
        $data = Db::table('virtto_admin')->select();

        //数据传送到界面
        $this ->assign("data",$data);

        return view();
        ///return $this->fetch();
    }

    public function hello($name = 'ThinkPHP5')
    {
        return 'hello,' . $name;
    }

    //本模块不同控制器的调用
    public function conrtollerCall(){
        $model = new \app\index\controller\User;
        echo $model->index();

        echo "<hr>";

        $model = new User();
        echo $model->index();


    }

    //参数设计
    public function course(){
        echo input('id');
    }
}
